<template>
  <view class="user-detail-page">
    <!-- 用户信息区域 -->
    <view class="user-info-section">
      <!-- 头像 -->
      <image 
        :src="userInfo.avatar" 
        class="avatar"
        mode="widthFix"
      ></image>
      
      <!-- 基本信息 -->
      <view class="user-basic" style="background-color: #f7f9fb;">
        <view class="name-row">
          <text class="username">{{ userInfo.username }}</text>
          <view class="tags">
            <view class="verify-tag">已实名</view>
            <view class="status-tag">{{ userInfo.status }}</view>
          </view>
        </view>
        <text class="id-text">***********</text>
        <text class="bio">{{ userInfo.bio }}</text>
      </view>
      
      <!-- 关注按钮 -->
      <button class="follow-btn">{{ userInfo.followText }}</button>
    </view>

    <!-- 内容区域 -->
    <view class="content-section">
      <!-- 动态区域 -->
      <view class="section-item">
        <text class="section-title">动态</text>
        <view class="empty-box">
          <image 
            src="/static/box-placeholder.png" 
            class="empty-img"
            mode="widthFix"
          ></image>
          <text class="empty-text">该用户尚未发布任何任务</text>
        </view>
      </view>

      <!-- 客户评价区域 -->
      <view class="section-item">
        <text class="section-title">客户评价</text>
        <view class="empty-box">
          <image 
            src="/static/box-placeholder.png" 
            class="empty-img"
            mode="widthFix"
          ></image>
          <text class="empty-text">该用户尚未有评价</text>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import { ref } from 'vue';

export default {
  setup() {
    // 静态用户数据
    const userInfo = ref({
      avatar: 'https://picsum.photos/200/200?random=10',
      username: '用户842',
      status: '忙碌',
      bio: '从业模具设计20年，老司机',
      followText: '关注他'
    });

    return {
      userInfo
    };
  }
};
</script>

<style scoped>
/* 页面基础样式 */
.user-detail-page {
  background-color: #f7f9fb;
  min-height: 100vh;
  padding-top: 176rpx;
}

/* 头部导航 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 88rpx;
  padding: 0 30rpx;
  background-color: #f7f9fb;
}

.back {
  font-size: 40rpx;
  color: #333;
  line-height: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 30rpx;
}

.dots {
  font-size: 28rpx;
  color: #333;
}

.eye {
  font-size: 28rpx;
  color: #333;
}

/* 用户信息区域 */
.user-info-section {
  display: flex;
  align-items: flex-start;
  padding: 30rpx;
 background-color: #f7f9fb;
  border-bottom: 10rpx solid #f5f5f5;
}

.avatar {
  width: 120rpx;
  height: 120rpx;
  border-radius: 50%;
  background-color: #f1f1f1;
  margin-right: 25rpx;
}

.user-basic {
  flex: 1;
  min-width: 0;
  margin-right: 20rpx;
  background-color: #f7f9fb;
}

.name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10rpx;
  margin-bottom: 15rpx;
}

.username {
  font-size: 36rpx;
  font-weight: 600;
  color: #333;
  line-height: 1;
}

.tags {
  display: flex;
  align-items: center;
  gap: 10rpx;
}

.verify-tag {
  font-size: 22rpx;
  color: #00b42a;
  background-color: #f0f9f0;
  padding: 2rpx 10rpx;
  border-radius: 4rpx;
  display: flex;
  align-items: center;
}

.verify-tag::before {
  content: '✓';
  font-size: 16rpx;
  margin-right: 5rpx;
}

.status-tag {
  font-size: 22rpx;
  color: #f56c6c;
  background-color: #fef0f0;
  padding: 2rpx 10rpx;
  border-radius: 4rpx;
}

.id-text {
  display: block;
  font-size: 28rpx;
  color: #999;
  margin-bottom: 10rpx;
  line-height: 1;
}

.bio {
  display: block;
  font-size: 28rpx;
  color: #666;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.follow-btn {
  min-width: 140rpx;
  height: 60rpx;
  line-height: 60rpx;
  background-color: #36bffa;
  color: #fff;
  border: none;
  border-radius: 30rpx;
  font-size: 28rpx;
  padding: 0 20rpx;
  margin-top: 30rpx;
}

/* 内容区域 */
.content-section {
  padding: 0 30rpx 30rpx;
}

.section-item {
  background-color: #fff;
  border-radius: 10rpx;
  padding: 30rpx;
  margin-bottom: 20rpx;
}

.section-title {
  display: block;
  font-size: 32rpx;
  font-weight: 600;
  color: #333;
  margin-bottom: 30rpx;
}

.empty-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60rpx 0;
}

.empty-img {
  width: 180rpx;
  height: 180rpx;
  margin-bottom: 20rpx;
  opacity: 0.5;
}

.empty-text {
  font-size: 28rpx;
  color: #999;
  text-align: center;
}
</style>
